<?php
namespace app\user\controllers;
use app\user\common\ViewBaseController;
use lib\db\DbTool;
use lib\redis\RedisTool;
use lib\Tool\Tools;

class TestController extends ViewBaseController {
    public function actionIndex(){
        echo '进入测试方法';
        echo '<Br>';
        $data = RedisTool::_init(0)->setKey('K1')->getString()->getReturn();
        echo 'RedisTOOL';
        echo Tools::My()->output($data);

        echo 'MySql测试11';
        echo '<Br>';
        $res = DbTool::find('shop_goods')->where([['=','goods_id','5'],['=','goods_id',4]],'or')->update(['goods_name'=>rand(0,10)]);
        $this->assign('keys',['t'=>'yes']);
        return $this->display('test/index');
    }
}